package com.tdkj.model.bbs;

import java.sql.Timestamp;
import java.util.HashSet;
import java.util.Set;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;

/**
 * EjfBoard entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "ejf_board", catalog = "west")
public class EjfBoard implements java.io.Serializable {

	// Fields

	private Integer boardId;
	private EjfSection ejfSection;
	private String boardName;
	private String highColor;
	private Integer seqno;
	private String brief;
	private String keywords;
	private String moderator;
	private String viewStyle;
	private String sortField;
	private String isImageOk;
	private String isMediaOk;
	private String isGuestPostOk;
	private String allowGroups;
	private String acl;
	private String ruleCode;
	private String headAdCode;
	private String footAdCode;
	private String state;
	private Timestamp createTime;
	private Timestamp updateTime;
	private Set<EjfTopic> ejfTopics = new HashSet<EjfTopic>(0);

	// Constructors

	/** default constructor */
	public EjfBoard() {
	}

	/** minimal constructor */
	public EjfBoard(EjfSection ejfSection, String boardName, Timestamp updateTime) {
		this.ejfSection = ejfSection;
		this.boardName = boardName;
		this.updateTime = updateTime;
	}

	/** full constructor */
	public EjfBoard(EjfSection ejfSection, String boardName, String highColor, Integer seqno, String brief, String keywords, String moderator, String viewStyle, String sortField, String isImageOk, String isMediaOk, String isGuestPostOk, String allowGroups, String acl, String ruleCode,
			String headAdCode, String footAdCode, String state, Timestamp createTime, Timestamp updateTime, Set<EjfTopic> ejfTopics) {
		this.ejfSection = ejfSection;
		this.boardName = boardName;
		this.highColor = highColor;
		this.seqno = seqno;
		this.brief = brief;
		this.keywords = keywords;
		this.moderator = moderator;
		this.viewStyle = viewStyle;
		this.sortField = sortField;
		this.isImageOk = isImageOk;
		this.isMediaOk = isMediaOk;
		this.isGuestPostOk = isGuestPostOk;
		this.allowGroups = allowGroups;
		this.acl = acl;
		this.ruleCode = ruleCode;
		this.headAdCode = headAdCode;
		this.footAdCode = footAdCode;
		this.state = state;
		this.createTime = createTime;
		this.updateTime = updateTime;
		this.ejfTopics = ejfTopics;
	}

	// Property accessors
	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "boardID", unique = true, nullable = false)
	public Integer getBoardId() {
		return this.boardId;
	}

	public void setBoardId(Integer boardId) {
		this.boardId = boardId;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "sectionID", nullable = false)
	public EjfSection getEjfSection() {
		return this.ejfSection;
	}

	public void setEjfSection(EjfSection ejfSection) {
		this.ejfSection = ejfSection;
	}

	@Column(name = "boardName", nullable = false, length = 20)
	public String getBoardName() {
		return this.boardName;
	}

	public void setBoardName(String boardName) {
		this.boardName = boardName;
	}

	@Column(name = "highColor", length = 6)
	public String getHighColor() {
		return this.highColor;
	}

	public void setHighColor(String highColor) {
		this.highColor = highColor;
	}

	@Column(name = "seqno")
	public Integer getSeqno() {
		return this.seqno;
	}

	public void setSeqno(Integer seqno) {
		this.seqno = seqno;
	}

	@Column(name = "brief", length = 100)
	public String getBrief() {
		return this.brief;
	}

	public void setBrief(String brief) {
		this.brief = brief;
	}

	@Column(name = "keywords", length = 100)
	public String getKeywords() {
		return this.keywords;
	}

	public void setKeywords(String keywords) {
		this.keywords = keywords;
	}

	@Column(name = "moderator", length = 60)
	public String getModerator() {
		return this.moderator;
	}

	public void setModerator(String moderator) {
		this.moderator = moderator;
	}

	@Column(name = "viewStyle", length = 20)
	public String getViewStyle() {
		return this.viewStyle;
	}

	public void setViewStyle(String viewStyle) {
		this.viewStyle = viewStyle;
	}

	@Column(name = "sortField", length = 20)
	public String getSortField() {
		return this.sortField;
	}

	public void setSortField(String sortField) {
		this.sortField = sortField;
	}

	@Column(name = "isImageOK", length = 1)
	public String getIsImageOk() {
		return this.isImageOk;
	}

	public void setIsImageOk(String isImageOk) {
		this.isImageOk = isImageOk;
	}

	@Column(name = "isMediaOK", length = 1)
	public String getIsMediaOk() {
		return this.isMediaOk;
	}

	public void setIsMediaOk(String isMediaOk) {
		this.isMediaOk = isMediaOk;
	}

	@Column(name = "isGuestPostOK", length = 1)
	public String getIsGuestPostOk() {
		return this.isGuestPostOk;
	}

	public void setIsGuestPostOk(String isGuestPostOk) {
		this.isGuestPostOk = isGuestPostOk;
	}

	@Column(name = "allowGroups", length = 20)
	public String getAllowGroups() {
		return this.allowGroups;
	}

	public void setAllowGroups(String allowGroups) {
		this.allowGroups = allowGroups;
	}

	@Column(name = "acl", length = 100)
	public String getAcl() {
		return this.acl;
	}

	public void setAcl(String acl) {
		this.acl = acl;
	}

	@Column(name = "ruleCode", length = 65535)
	public String getRuleCode() {
		return this.ruleCode;
	}

	public void setRuleCode(String ruleCode) {
		this.ruleCode = ruleCode;
	}

	@Column(name = "headAdCode", length = 65535)
	public String getHeadAdCode() {
		return this.headAdCode;
	}

	public void setHeadAdCode(String headAdCode) {
		this.headAdCode = headAdCode;
	}

	@Column(name = "footAdCode", length = 65535)
	public String getFootAdCode() {
		return this.footAdCode;
	}

	public void setFootAdCode(String footAdCode) {
		this.footAdCode = footAdCode;
	}

	@Column(name = "state", length = 1)
	public String getState() {
		return this.state;
	}

	public void setState(String state) {
		this.state = state;
	}

	@Column(name = "createTime", length = 19)
	public Timestamp getCreateTime() {
		return this.createTime;
	}

	public void setCreateTime(Timestamp createTime) {
		this.createTime = createTime;
	}

	@Column(name = "updateTime", nullable = false, length = 19)
	public Timestamp getUpdateTime() {
		return this.updateTime;
	}

	public void setUpdateTime(Timestamp updateTime) {
		this.updateTime = updateTime;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "ejfBoard")
	public Set<EjfTopic> getEjfTopics() {
		return this.ejfTopics;
	}

	public void setEjfTopics(Set<EjfTopic> ejfTopics) {
		this.ejfTopics = ejfTopics;
	}

}